package cn.gson.work.model.pojos;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;

@Entity
public class Records {
    private String rsid;
    private String rsname;
    private String rstate;

    @Id
    @Column(name = "RSID")
    public String getRsid() {
        return rsid;
    }

    public void setRsid(String rsid) {
        this.rsid = rsid;
    }

    @Basic
    @Column(name = "RSNAME")
    public String getRsname() {
        return rsname;
    }

    public void setRsname(String rsname) {
        this.rsname = rsname;
    }

    @Basic
    @Column(name = "RSTATE")
    public String getRstate() {
        return rstate;
    }

    public void setRstate(String rstate) {
        this.rstate = rstate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Records records = (Records) o;
        return Objects.equals(rsid, records.rsid) &&
                Objects.equals(rsname, records.rsname) &&
                Objects.equals(rstate, records.rstate);
    }

    @Override
    public int hashCode() {
        return Objects.hash(rsid, rsname, rstate);
    }
}
